package com.action.workreport;
import com.db.workreport.*;

import java.util.*;
import com.db.user.*;
import com.opensymphony.xwork2.ActionContext;
public class InsertAction {
	
	private String subject;
	private String content;
	private int get;
	private int sabun;
	private int agreer;
	
private WorkReportDAO reportDAO;
	

	
	public void setReportDAO(WorkReportDAO reportDAO) {
		this.reportDAO = reportDAO;
	}

	public void setAgreer(int agreer) {
		this.agreer = agreer;
	}

	
	WorkReportVO vo=new WorkReportVO();
	
	
	
	
	public WorkReportVO getVo() {
		return vo;
	}
	public void setVo(WorkReportVO vo) {
		this.vo = vo;
	}
	public void setSabun(int sabun) {
		this.sabun = sabun;
	}
	public void setGet(int get) {
		this.get = get;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	public String execute() throws Exception{
		vo.setSubject(subject);
		vo.setContent(content);
		vo.setGet(get);
		vo.setSend(sabun);
		vo.setAgreer(agreer);
		System.out.println("1"+vo.toString());
		reportDAO.InsertData(vo);
		return "success";
	}
	
	public String execute1() throws Exception{
		vo.setSubject(subject);
		vo.setContent(content);
		vo.setGet(get);
		vo.setSend(sabun);
		vo.setAgreer(agreer);
		reportDAO.InsertData1(vo);
		return "success";
		
	}
	
	
}
